package app.champaign;

public class L83_DeleteDuplicates{

    public static void main(String[] args) {
        
    }

    public static ListNode deleteDuplicates1(ListNode head) {
        ListNode current = head;
        while(current != null && current.next != null){
            if(current.next.val == current.val){
                current.next = current.next.next;
            }else{
                current = current.next;
            }
        }
        return head;
    }

}